package com.neusoft.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neusoft.dao.EmpMapper;
import com.neusoft.entity.Emp;
import com.neusoft.service.EmpService;

@Service("empService")
public class ServiceImpl implements EmpService {

	@Autowired
	private EmpMapper empMapper=null;
	
	public EmpMapper getEmpMapper() {
		return empMapper;
	}

	public void setEmpMapper(EmpMapper empMapper) {
		this.empMapper = empMapper;
	}

	@Override
	public List<Emp> getEmpbyDeptno(int deptno) {
		// TODO Auto-generated method stub
		return empMapper.getEmpbyDeptno(deptno);
	}

	@Override
	public Emp getEmpbyEmpno(int empno) {
		// TODO Auto-generated method stub
		return empMapper.getEmpbyEmpno(empno);
	}

	@Override
	public int insertEmp(Emp emp) {
		// TODO Auto-generated method stub
		return empMapper.insertEmp(emp);
	}

	@Override
	public int moveEmp(int empno, int deptno) {
		// TODO Auto-generated method stub
		return empMapper.moveEmp(empno, deptno);
	}

	@Override
	public int updateTotalSal(int deptno, double totalSal) {
		// TODO Auto-generated method stub
		return empMapper.updateTotalSal(deptno, totalSal);
	}

	@Override
	public int moveEmpcondition(int deptno) {
		// TODO Auto-generated method stub
		return 0;
	}

}
